# -*- coding: utf-8 -*-
# @Time     : 2021/11/30 10:24
# @Author   : wljess
# @File     : join同步阻塞.py
# @Describe : 
# @Software : PyCharm

import time
from multiprocessing import Process


def send():
    time.sleep(1)
    print("发送了一份邮件")


if __name__ == '__main__':
    p = Process(target=send)
    p.start()  # 异步非阻塞
    time.sleep(2)
    p.join()  # 同步阻塞  直到p对应的进程结束之后才结束阻塞
    print("邮件发送完毕...")
